package cn.chengpengper.rpc.test.consumer.codec;

import cn.chengpengper.rpc.test.consumer.codec.init.RpcTestConsumerInitializer;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioSocketChannel;

/**
 * @author chengpeng.hu
 */
public class RpcTestConsumer {

    public static void main(String[] args) throws InterruptedException {
        Bootstrap bootstrap = new Bootstrap();
        NioEventLoopGroup eventLoopGroup = new NioEventLoopGroup();
        bootstrap.group(eventLoopGroup)
                .channel(NioSocketChannel.class)
                .handler(new RpcTestConsumerInitializer());
        bootstrap.connect("127.0.0.1",27880).sync();
        Thread.sleep(2000);
        eventLoopGroup.shutdownGracefully();
    }
}
